rust-multihash
multihash implementation in Rust.
Table of Contents
Install
First add this to your Cargo.toml
[]
= "*"
Then run cargo build
.
MSRV
The minimum supported Rust version for this library is 1.64.0
.
This is only guaranteed without additional features activated.
Usage
The multihash
crate exposes a basic data structure for encoding and decoding multihash.
It does not provide any hashing functionality itself.
Multihash
uses const-generics to define the internal buffer size.
You should set this to the maximum size of the digest you want to support.
use Multihash;
const SHA2_256: u64 = 0x12;
Using a custom code table
You can derive your own application specific code table using the multihash-derive
crate.
The multihash-codetable
provides predefined hasher implementations if you don't want to implement your own.
use MultihashDigest;
Supported Hash Types
SHA1
SHA2-256
SHA2-512
SHA3
/Keccak
Blake2b-256
/Blake2b-512
/Blake2s-128
/Blake2s-256
Blake3
Strobe
Maintainers
Captain: @dignifiedquire.
Contribute
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.